---
image: {{ .ModuleName }}/{{ .ImageName }}
fromImage: common/distroless
import:
- artifact: {{ $.ModuleName }}/{{ $.ImageName }}-artifact
  add: /src/check-kernel-version
  to: /check-kernel-version
  before: setup
docker:
  ENTRYPOINT: [ "/check-kernel-version" ]
---
artifact: {{ .ModuleName }}/{{ .ImageName }}-artifact
from: {{ .Images.BASE_GOLANG_19_ALPINE }}
git:
- add: /{{ $.ModulePath }}modules/000-{{ $.ModuleName }}/images/{{ $.ImageName }}/src
  to: /src
  stageDependencies:
    install:
    - '**/*'
mount:
- fromPath: ~/go-pkg-cache
  to: /go/pkg
shell:
  install:
  - cd /src
  - GOPROXY={{ .GOPROXY }} GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -ldflags="-w -s" -o check-kernel-version check-kernel-version.go
  - chown 64535:64535 check-kernel-version
  - chmod 0700 check-kernel-version
